package com.ruoyi.system.service.impl;

import java.util.List;
import java.util.Map;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.ProvideAllRecordsMapper;
import com.ruoyi.system.domain.ProvideAllRecords;
import com.ruoyi.system.service.IProvideAllRecordsService;

/**
 * 供应商付款Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-08
 */
@Service
public class ProvideAllRecordsServiceImpl implements IProvideAllRecordsService 
{
    @Autowired
    private ProvideAllRecordsMapper provideAllRecordsMapper;

    /**
     * 查询供应商付款
     * 
     * @param id 供应商付款主键
     * @return 供应商付款
     */
    @Override
    public ProvideAllRecords selectProvideAllRecordsById(Long id)
    {
        return provideAllRecordsMapper.selectProvideAllRecordsById(id);
    }

    /**
     * 查询供应商付款列表
     * 
     * @param provideAllRecords 供应商付款
     * @return 供应商付款
     */
    @Override
    public List<ProvideAllRecords> selectProvideAllRecordsList(ProvideAllRecords provideAllRecords)
    {
        return provideAllRecordsMapper.selectProvideAllRecordsList(provideAllRecords);
    }

    /**
     * 新增供应商付款
     * 
     * @param provideAllRecords 供应商付款
     * @return 结果
     */
    @Override
    public int insertProvideAllRecords(ProvideAllRecords provideAllRecords)
    {
        return provideAllRecordsMapper.insertProvideAllRecords(provideAllRecords);
    }

    /**
     * 修改供应商付款
     * 
     * @param provideAllRecords 供应商付款
     * @return 结果
     */
    @Override
    public int updateProvideAllRecords(ProvideAllRecords provideAllRecords)
    {
        return provideAllRecordsMapper.updateProvideAllRecords(provideAllRecords);
    }

    /**
     * 批量删除供应商付款
     * 
     * @param ids 需要删除的供应商付款主键
     * @return 结果
     */
    @Override
    public int deleteProvideAllRecordsByIds(Long[] ids)
    {
        return provideAllRecordsMapper.deleteProvideAllRecordsByIds(ids);
    }

    /**
     * 删除供应商付款信息
     * 
     * @param id 供应商付款主键
     * @return 结果
     */
    @Override
    public int deleteProvideAllRecordsById(Long id)
    {
        return provideAllRecordsMapper.deleteProvideAllRecordsById(id);
    }

    @Override
    public List<Map<String, Object>> selectAllRecords(String time) {
        return provideAllRecordsMapper.selectAllRecords(time);
    }

    @Override
    public Double selectSumMoney(String provide, String financeCode, String createTime, String status) {
        return provideAllRecordsMapper.selectSumMoney(provide,financeCode,createTime,status);
    }

    @Override
    public Integer deleteUpload(String time) {
        return provideAllRecordsMapper.deleteUpload(time);
    }

    @Override
    public int insertBatch(List<ProvideAllRecords> provideAllRecords) {
        return provideAllRecordsMapper.insertBatch(provideAllRecords);
    }

    @Override
    public Double selectProviderMoney(String provider, String createTime) {
        return provideAllRecordsMapper.selectProviderMoney(provider,createTime);
    }

}
